//
//  AFHTTPSessionManager+JX.h
//  Demo
//
//  Created by xiu on 2020/4/22.
//  Copyright © 2020 111. All rights reserved.
//

#import "JXRequestManager.h"

NS_ASSUME_NONNULL_BEGIN

@interface JXRequestManager (JX)
/**
* @method POST/GET 请求类型
* @URLString   请求地址
* @parameters  参数
*/
- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method
                                       URLString:(NSString *)URLString
                                      parameters:(id)parameters
                                         success:(void (^)(NSURLSessionDataTask *, id))success
                                         failure:(void (^)(NSURLSessionDataTask *, NSError *))failure;
/**
* @URLString 请求地址
* @body   参数
*/
- (NSURLSessionDataTask *)dataTaskWithPOSTURLString:(NSString *)URLString
                                               Body:(NSData *)body
                                            success:(void (^)(NSURLSessionDataTask *, id))success
                                            failure:(void (^)(NSURLSessionDataTask *, NSError *))failure;
/**
* @downloadURL 下载地址
*/
+ (void)downloadURL:(NSString *)downloadURL progress:(void (^)(NSProgress *downloadProgress))progress destination:(void (^)(NSURL *targetPath))destination failure:(void(^)(NSError *error))faliure;
@end

NS_ASSUME_NONNULL_END
